package com.tedu.sp02.item.service;

import cn.tedu.sp01.pojo.Item;
import cn.tedu.sp01.service.ItemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@Service
public class ItemServiceImpl implements ItemService {
    @Override
    public List<Item> getItems(String orderId) {
        ArrayList<Item> list = new ArrayList<>();
        list.add(new Item(1, "we", 22));
        list.add(new Item(1, "we", 22));
        list.add(new Item(1, "we", 22));
        return list;//返回写死的数据
    }

    @Override
    public void decreaseNumbers(List<Item> list) {
        for (Item item : list) {
            log.info("nihao" + item);
        }
    }
}
